﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="Add.aspx.cs" Inherits="lcs.Web.demandplaninfo.Add" Title="增加页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../../js/jquery-1.6.1.min.js"></script>
    <link href="../../js/jquery.autocomplete.css" rel="stylesheet" />
    <script src="../../js/jquery.autocomplete.js"></script>
     <script type="text/javascript">
         function GetJobTitle(obj) {
             $(obj).autocomplete("../../Handler.ashx", {
                 max: 12,    //列表里的条目数
                 minChars: 0,    //自动完成激活之前填入的最小字符
                 width: 300,     //提示的宽度，溢出隐藏
                 scrollHeight: 300,   //提示的高度，溢出显示滚动条
                 matchContains: true,    //包含匹配，就是data参数里的数据，是否只要包含文本框里的数据就显示
                 autoFill: false,    //自动填充
                 extraParams: { key: function () { return encodeURIComponent($(obj).val()); }, key1: function () { return $(obj).val(); } },
                 parse: function (data) {
                     return $.map(eval(data), function (row) {
                         return {
                             data: row,
                             value: row.proid,
                             result: row.projectName
                         }
                     }); //对ajax页面传过来的数据进行json转码
                 },
                 formatItem: function (row, i, max) {
                     return row.projectName;
                 },
                 formatMatch: function (row, i, max) {
                     return row.projectName + row.proid;
                 },
                 formatResult: function (row) {
                     return row.projectName;
                 }
             }).result(function (event, row, formatted) {
                 $("#<%# hfpid.ClientID%>").val(row.proid);
                 return row.projectName;
             });
         }
         $(function () {
             var ac = $("#<%# txtproject.ClientID%>");
             GetJobTitle(ac);

         });
         </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">    
    <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td class="tdbg">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
    <tr>
	<td height="25" width="30%" align="right">
		项目名称
	：</td>
	<td height="25" width="*" align="left">
		<asp:TextBox id="txtproject" runat="server" Width="350px"></asp:TextBox>
        <asp:HiddenField ID="hfpid" runat="server" />
	</td></tr>
	<tr>
	<td height="25" width="30%" align="right">
		计划编号
	：</td>
	<td height="25" width="*" align="left">
		<asp:TextBox id="txtpbh" runat="server" Width="200px"></asp:TextBox>
	</td></tr>
	<tr>
	<td height="25" width="30%" align="right">
		采购类别(物资/服务)
	：</td>
	<td height="25" width="*" align="left">
        <asp:DropDownList ID="ddlptype" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlptype_SelectedIndexChanged">
           
        </asp:DropDownList>
	</td></tr>
    
    <asp:Panel ID="pxy" runat="server" Visible="false"> 
	<tr>
	<td height="25" width="30%" align="right">
		物料类别：</td>
	<td height="25" width="*" align="left">
        <asp:DropDownList ID="ddlm" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlm_SelectedIndexChanged">
        </asp:DropDownList>
	</td></tr>
	<tr>
	<td height="25" width="30%" align="right">
		供应商：</td>
	<td height="25" width="*" align="left">
        <asp:DropDownList ID="ddls" runat="server">
        </asp:DropDownList>
	</td></tr>
     </asp:Panel>  
	<tr>
	<td height="25" width="30%" align="right">
		审批流程：</td>
	<td height="25" width="*" align="left">
        <asp:DropDownList ID="ddl_flow" runat="server">
        </asp:DropDownList>
	</td></tr>
	</table>

            </td>
        </tr>
        <tr>
            <td class="tdbg" align="center" valign="bottom">
                &nbsp;<asp:Button ID="btnSave" runat="server" Text="提交"
                    OnClick="btnSave_Click" class="inputbutton" ></asp:Button>
                &nbsp;
                <asp:Button ID="btnCancle" runat="server" Text="取消"
                    OnClick="btnCancle_Click" class="inputbutton" ></asp:Button>
            </td>
        </tr>
    </table>
    <br />
</asp:Content>

